<?php
namespace app\controller;

use app\BaseController;
use think\facade\Request;

class Demo extends BaseController
{
    public function index()
    {
        $result = [
            'code' => '1',
            'message' =>'ok',
            'data' => [
                'name' => 'vy',
            ]
        ];
        $header = [
            'token' => 'dlfgasgbl',
        ];

        return json($result,201,$header);
    }
    public function request(){
        dump($this->app->request->param());

    }
}
